.class public Lcom/estrongs/android/ui/drag/DragGrid;
.super Landroid/widget/FrameLayout;
.source "DragGrid.java"

# interfaces
.implements Lcom/estrongs/android/ui/drag/g;


# instance fields
.field private a:Lcom/estrongs/android/ui/drag/a;

.field private b:Z

.field private c:Lcom/estrongs/fs/g;

.field private d:Ljava/lang/String;

.field private e:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/estrongs/fs/g;",
            ">;"
        }
    .end annotation
.end field

.field private f:Z

.field private g:Z

.field private h:Z

.field private i:Landroid/widget/ImageView;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    const/4 p1, 0x0

    .line 2
    iput-boolean p1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->b:Z

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0

    .line 3
    invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    const/4 p1, 0x0

    .line 4
    iput-boolean p1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->b:Z

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 0

    .line 5
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    const/4 p1, 0x0

    .line 6
    iput-boolean p1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->b:Z

    return-void
.end method


# virtual methods
.method public a()V
    .locals 4

    .line 7
    iget-object v0, p0, Lcom/estrongs/android/ui/drag/DragGrid;->a:Lcom/estrongs/android/ui/drag/a;

    const/4 v1, 0x0

    if-nez v0, :cond_0

    .line 8
    invoke-virtual {p0, v1}, Landroid/widget/FrameLayout;->setVisibility(I)V

    return-void

    .line 9
    :cond_0
    invoke-virtual {v0}, Lcom/estrongs/android/ui/drag/a;->d()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/util/List;

    iput-object v0, p0, Lcom/estrongs/android/ui/drag/DragGrid;->e:Ljava/util/List;

    .line 10
    iget-object v2, p0, Lcom/estrongs/android/ui/drag/DragGrid;->d:Ljava/lang/String;

    if-eqz v2, :cond_3

    if-nez v0, :cond_1

    goto :goto_0

    .line 11
    :cond_1
    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_2
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_4

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/estrongs/fs/g;

    .line 12
    iget-object v3, p0, Lcom/estrongs/android/ui/drag/DragGrid;->d:Ljava/lang/String;

    invoke-interface {v2}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v3, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_2

    const/4 v0, 0x1

    .line 13
    iput-boolean v0, p0, Lcom/estrongs/android/ui/drag/DragGrid;->f:Z

    goto :goto_1

    .line 14
    :cond_3
    :goto_0
    iput-boolean v1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->f:Z

    .line 15
    :cond_4
    :goto_1
    iget-boolean v0, p0, Lcom/estrongs/android/ui/drag/DragGrid;->f:Z

    if-nez v0, :cond_5

    .line 16
    invoke-virtual {p0, v1}, Landroid/widget/FrameLayout;->setVisibility(I)V

    goto :goto_2

    :cond_5
    const/4 v0, 0x4

    .line 17
    invoke-virtual {p0, v0}, Landroid/widget/FrameLayout;->setVisibility(I)V

    :goto_2
    return-void
.end method

.method public a(Lcom/estrongs/android/ui/drag/d;IIIILcom/estrongs/android/ui/drag/e;Ljava/lang/Object;)V
    .locals 7

    .line 1
    invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;

    move-result-object p1

    .line 2
    iget-object v2, p0, Lcom/estrongs/android/ui/drag/DragGrid;->c:Lcom/estrongs/fs/g;

    instance-of v3, v2, Lcom/estrongs/fs/impl/pcs/b;

    .line 3
    move-object v0, p1

    check-cast v0, Landroid/app/Activity;

    move-object v1, p7

    check-cast v1, Ljava/util/List;

    const/4 v4, 0x1

    const/4 v5, 0x0

    const/4 v6, 0x1

    invoke-static/range {v0 .. v6}, Lcom/estrongs/android/pop/utils/p;->a(Landroid/app/Activity;Ljava/util/List;Lcom/estrongs/fs/g;ZZLes/z80;Z)V

    .line 4
    instance-of p2, p1, Lcom/estrongs/android/pop/view/FileExplorerActivity;

    if-eqz p2, :cond_0

    .line 5
    check-cast p1, Lcom/estrongs/android/pop/view/FileExplorerActivity;

    .line 6
    invoke-virtual {p1}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->R()V

    :cond_0
    return-void
.end method

.method public b(Lcom/estrongs/android/ui/drag/d;IIIILcom/estrongs/android/ui/drag/e;Ljava/lang/Object;)Z
    .locals 0

    .line 1
    iget-boolean p1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->g:Z

    .line 2
    iget-object p2, p0, Lcom/estrongs/android/ui/drag/DragGrid;->c:Lcom/estrongs/fs/g;

    instance-of p2, p2, Lcom/estrongs/fs/impl/pcs/b;

    if-eqz p2, :cond_0

    .line 3
    invoke-static {}, Lcom/estrongs/android/ui/pcs/f;->k()Lcom/estrongs/android/ui/pcs/f;

    move-result-object p1

    invoke-virtual {p1}, Lcom/estrongs/android/ui/pcs/f;->i()Z

    move-result p1

    .line 4
    :cond_0
    invoke-virtual {p0}, Landroid/widget/FrameLayout;->getVisibility()I

    move-result p2

    if-nez p2, :cond_1

    if-eqz p1, :cond_1

    const/4 p1, 0x1

    goto :goto_0

    :cond_1
    const/4 p1, 0x0

    :goto_0
    return p1
.end method

.method public c(Lcom/estrongs/android/ui/drag/d;IIIILcom/estrongs/android/ui/drag/e;Ljava/lang/Object;)V
    .locals 0

    const/4 p1, 0x0

    .line 1
    iput-boolean p1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->b:Z

    .line 2
    invoke-virtual {p0}, Landroid/widget/FrameLayout;->invalidate()V

    return-void
.end method

.method public d(Lcom/estrongs/android/ui/drag/d;IIIILcom/estrongs/android/ui/drag/e;Ljava/lang/Object;)V
    .locals 0

    return-void
.end method

.method protected dispatchDraw(Landroid/graphics/Canvas;)V
    .locals 4
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "NewApi"
        }
    .end annotation

    const/4 v0, 0x0

    .line 1
    :try_start_0
    invoke-static {}, Lcom/estrongs/android/pop/l;->L1()Lcom/estrongs/android/pop/l;

    move-result-object v1

    invoke-virtual {v1}, Lcom/estrongs/android/pop/l;->k1()Z

    move-result v1

    if-eqz v1, :cond_1

    .line 2
    iget-boolean v1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->h:Z

    if-eqz v1, :cond_0

    .line 3
    iget-object v1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->i:Landroid/widget/ImageView;

    if-eqz v1, :cond_1

    iget-object v1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->i:Landroid/widget/ImageView;

    instance-of v1, v1, Lcom/estrongs/android/pop/esclasses/ESImageView;

    if-eqz v1, :cond_1

    .line 4
    iget-object v1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->i:Landroid/widget/ImageView;

    check-cast v1, Lcom/estrongs/android/pop/esclasses/ESImageView;

    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Lcom/estrongs/android/pop/esclasses/ESImageView;->setTranslucent(Z)V

    .line 5
    iget-object v1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->i:Landroid/widget/ImageView;

    invoke-virtual {v1}, Landroid/widget/ImageView;->invalidate()V

    goto :goto_0

    .line 6
    :cond_0
    iget-object v1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->i:Landroid/widget/ImageView;

    if-eqz v1, :cond_1

    iget-object v1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->i:Landroid/widget/ImageView;

    instance-of v1, v1, Lcom/estrongs/android/pop/esclasses/ESImageView;

    if-eqz v1, :cond_1

    .line 7
    iget-object v1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->i:Landroid/widget/ImageView;

    check-cast v1, Lcom/estrongs/android/pop/esclasses/ESImageView;

    invoke-virtual {v1, v0}, Lcom/estrongs/android/pop/esclasses/ESImageView;->setTranslucent(Z)V

    .line 8
    iget-object v1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->i:Landroid/widget/ImageView;

    invoke-virtual {v1}, Landroid/widget/ImageView;->invalidate()V

    .line 9
    :cond_1
    :goto_0
    invoke-super {p0, p1}, Landroid/widget/FrameLayout;->dispatchDraw(Landroid/graphics/Canvas;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_1

    :catchall_0
    nop

    .line 10
    :goto_1
    iget-boolean v1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->b:Z

    if-eqz v1, :cond_4

    .line 11
    iget-boolean v1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->g:Z

    .line 12
    iget-object v2, p0, Lcom/estrongs/android/ui/drag/DragGrid;->c:Lcom/estrongs/fs/g;

    instance-of v2, v2, Lcom/estrongs/fs/impl/pcs/b;

    if-eqz v2, :cond_2

    .line 13
    invoke-static {}, Lcom/estrongs/android/ui/pcs/f;->k()Lcom/estrongs/android/ui/pcs/f;

    move-result-object v1

    invoke-virtual {v1}, Lcom/estrongs/android/ui/pcs/f;->i()Z

    move-result v1

    :cond_2
    const/16 v2, 0x50

    if-eqz v1, :cond_3

    const/16 v0, 0x31

    const/16 v1, 0x92

    const/16 v3, 0xf9

    .line 14
    invoke-static {v2, v0, v1, v3}, Landroid/graphics/Color;->argb(IIII)I

    move-result v0

    goto :goto_2

    :cond_3
    const/16 v1, 0xff

    .line 15
    invoke-static {v2, v1, v0, v0}, Landroid/graphics/Color;->argb(IIII)I

    move-result v0

    .line 16
    :goto_2
    invoke-virtual {p1}, Landroid/graphics/Canvas;->save()I

    move-result v1

    .line 17
    invoke-virtual {p1, v0}, Landroid/graphics/Canvas;->drawColor(I)V

    .line 18
    invoke-virtual {p1, v1}, Landroid/graphics/Canvas;->restoreToCount(I)V

    :cond_4
    return-void
.end method

.method public e(Lcom/estrongs/android/ui/drag/d;IIIILcom/estrongs/android/ui/drag/e;Ljava/lang/Object;)V
    .locals 0

    .line 1
    invoke-virtual {p0}, Lcom/estrongs/android/ui/drag/DragGrid;->a()V

    .line 2
    iget-boolean p1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->f:Z

    xor-int/lit8 p1, p1, 0x1

    iput-boolean p1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->b:Z

    .line 3
    invoke-virtual {p0}, Landroid/widget/FrameLayout;->invalidate()V

    return-void
.end method

.method public getFileObject()Lcom/estrongs/fs/g;
    .locals 1

    .line 1
    invoke-virtual {p0}, Landroid/widget/FrameLayout;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/estrongs/android/view/FileGridViewWrapper$DetailItemViewHolder;

    .line 2
    iget-object v0, v0, Lcom/estrongs/android/view/FeaturedGridViewWrapper$BaseViewHolder;->e:Ljava/lang/Object;

    check-cast v0, Lcom/estrongs/fs/g;

    return-object v0
.end method

.method public setDragController(Lcom/estrongs/android/ui/drag/a;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->a:Lcom/estrongs/android/ui/drag/a;

    return-void
.end method

.method public setFileObject(Lcom/estrongs/fs/g;)V
    .locals 3

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/ui/drag/DragGrid;->i:Landroid/widget/ImageView;

    if-nez v0, :cond_0

    const v0, 0x7f090d74

    .line 2
    invoke-virtual {p0, v0}, Landroid/widget/FrameLayout;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/estrongs/android/ui/drag/DragGrid;->i:Landroid/widget/ImageView;

    :cond_0
    if-eqz p1, :cond_4

    .line 3
    invoke-interface {p1}, Lcom/estrongs/fs/g;->i()Lcom/estrongs/fs/l;

    move-result-object v0

    if-eqz v0, :cond_4

    invoke-interface {p1}, Lcom/estrongs/fs/g;->getName()Ljava/lang/String;

    move-result-object v0

    if-nez v0, :cond_1

    goto :goto_2

    .line 4
    :cond_1
    iput-object p1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->c:Lcom/estrongs/fs/g;

    .line 5
    invoke-interface {p1}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/ui/drag/DragGrid;->d:Ljava/lang/String;

    const/4 v0, 0x0

    .line 6
    iput-boolean v0, p0, Lcom/estrongs/android/ui/drag/DragGrid;->f:Z

    .line 7
    invoke-interface {p1}, Lcom/estrongs/fs/g;->i()Lcom/estrongs/fs/l;

    move-result-object v1

    invoke-virtual {v1}, Lcom/estrongs/fs/l;->b()Z

    move-result v1

    iput-boolean v1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->g:Z

    .line 8
    invoke-interface {p1}, Lcom/estrongs/fs/g;->getName()Ljava/lang/String;

    move-result-object v1

    const-string v2, "."

    invoke-virtual {v1, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_3

    const-string v1, "item_is_scanned_server"

    invoke-interface {p1, v1}, Lcom/estrongs/fs/g;->a(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v2

    if-eqz v2, :cond_2

    invoke-interface {p1, v1}, Lcom/estrongs/fs/g;->a(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Ljava/lang/Boolean;

    invoke-virtual {p1}, Ljava/lang/Boolean;->booleanValue()Z

    move-result p1

    if-eqz p1, :cond_2

    goto :goto_0

    .line 9
    :cond_2
    iput-boolean v0, p0, Lcom/estrongs/android/ui/drag/DragGrid;->h:Z

    goto :goto_1

    :cond_3
    :goto_0
    const/4 p1, 0x1

    .line 10
    iput-boolean p1, p0, Lcom/estrongs/android/ui/drag/DragGrid;->h:Z

    .line 11
    :goto_1
    invoke-virtual {p0}, Lcom/estrongs/android/ui/drag/DragGrid;->a()V

    :cond_4
    :goto_2
    return-void
.end method
